//
//  PopMenuHeader.m
//  Guazi
//
//  Created by koolearn on 11-7-7.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import "PopMenuHeader.h"


@implementation PopMenuHeader

@synthesize title;

- (id)initWithTitle:(NSString*)t frame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.title = t;
        self.backgroundColor = [UIColor blackColor];
    }
    return self;
}


// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
    UIColor* textColor = [UIColor whiteColor];
    [textColor set];
    
    UIFont* textFont = [UIFont boldSystemFontOfSize:16];
    [self.title drawInRect:CGRectMake(5, 2, self.frame.size.width - 10, self.frame.size.height - 4) withFont:textFont];
}


- (void)dealloc
{
    [title release];
    [super dealloc];
}

@end
